/*
	File:		IEntity.h
	Course:		SGD 1303
	Author:		dmonroe
	Purpose:	IEntity class is the *interface* class for game entities
*/


#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>


//**************************************************
// IEntity class
//	- interface class to only expose the methods of game entities
//	  without exposing the implementation details
//	- abstract base class cannot be instantiated
class IEntity 
{
public:
	//**********************************************
	// Abstract Base Class!
	//	- cannot create an IEntity object
	virtual ~IEntity( void )	= 0
	{
	}


		
	//**********************************************
	// IEntity Interface:
	//	- pure virtual methods MUST be overridden
	//	  in a child class
	virtual void	Update ( float fElapsedTime )	= 0;		// move the entity
	virtual void	Render ( void )					= 0;		// draw the entity
	
	virtual RECT	GetRect( void ) const			= 0;		// return bounding box
	virtual int		GetType( void ) const			= 0;		// return the entity's type
	virtual bool	CheckCollision( IEntity* pOther )	= 0;	// handle collision against other entity


	//**********************************************
	// Reference Counting:
	//	- keeps the object in memory while there are still
	//	  pointers to the object
	//	- self-destructs when all the pointers are gone
	virtual void AddRef	( void )				= 0;
	virtual void Release( void )				= 0;
};

